\(\int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx\) [271]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 18 \[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {\tan (x)}{a}+\frac {\tan ^3(x)}{3 a} \]

[Out]

tan(x)/a+1/3*tan(x)^3/a

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3254, 3852} \[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {\tan ^3(x)}{3 a}+\frac {\tan (x)}{a} \]

[In]

Int[Sec[x]^2/(a - a*Sin[x]^2),x]

[Out]

Tan[x]/a + Tan[x]^3/(3*a)

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \sec ^4(x) \, dx}{a} \\ & = -\frac {\text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (x)\right )}{a} \\ & = \frac {\tan (x)}{a}+\frac {\tan ^3(x)}{3 a} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.83 \[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {\tan (x)+\frac {\tan ^3(x)}{3}}{a} \]

[In]

Integrate[Sec[x]^2/(a - a*Sin[x]^2),x]

[Out]

(Tan[x] + Tan[x]^3/3)/a

Maple [A] (verified)

Time = 0.39 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.78

method result size
default \(\frac {\frac {\left (\tan ^{3}\left (x \right )\right )}{3}+\tan \left (x \right )}{a}\) \(14\)
parallelrisch \(\frac {\tan \left (x \right ) \left (2+\sec ^{2}\left (x \right )\right )}{3 a}\) \(14\)
risch \(\frac {4 i \left (3 \,{\mathrm e}^{2 i x}+1\right )}{3 \left ({\mathrm e}^{2 i x}+1\right )^{3} a}\) \(25\)
norman \(\frac {-\frac {2 \tan \left (\frac {x}{2}\right )}{a}+\frac {4 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{3 a}-\frac {2 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{a}}{\left (\tan ^{2}\left (\frac {x}{2}\right )-1\right )^{3}}\) \(44\)

[In]

int(sec(x)^2/(a-a*sin(x)^2),x,method=_RETURNVERBOSE)

[Out]

1/a*(1/3*tan(x)^3+tan(x))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.06 \[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {{\left (2 \, \cos \left (x\right )^{2} + 1\right )} \sin \left (x\right )}{3 \, a \cos \left (x\right )^{3}} \]

[In]

integrate(sec(x)^2/(a-a*sin(x)^2),x, algorithm="fricas")

[Out]

1/3*(2*cos(x)^2 + 1)*sin(x)/(a*cos(x)^3)

Sympy [F]

\[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=- \frac {\int \frac {\sec ^{2}{\left (x \right )}}{\sin ^{2}{\left (x \right )} - 1}\, dx}{a} \]

[In]

integrate(sec(x)**2/(a-a*sin(x)**2),x)

[Out]

-Integral(sec(x)**2/(sin(x)**2 - 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.78 \[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {\tan \left (x\right )^{3} + 3 \, \tan \left (x\right )}{3 \, a} \]

[In]

integrate(sec(x)^2/(a-a*sin(x)^2),x, algorithm="maxima")

[Out]

1/3*(tan(x)^3 + 3*tan(x))/a

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.78 \[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {\tan \left (x\right )^{3} + 3 \, \tan \left (x\right )}{3 \, a} \]

[In]

integrate(sec(x)^2/(a-a*sin(x)^2),x, algorithm="giac")

[Out]

1/3*(tan(x)^3 + 3*tan(x))/a

Mupad [B] (verification not implemented)

Time = 13.68 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.72 \[ \int \frac {\sec ^2(x)}{a-a \sin ^2(x)} \, dx=\frac {\mathrm {tan}\left (x\right )\,\left ({\mathrm {tan}\left (x\right )}^2+3\right )}{3\,a} \]

[In]

int(1/(cos(x)^2*(a - a*sin(x)^2)),x)

[Out]

(tan(x)*(tan(x)^2 + 3))/(3*a)